<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ProjectTreeCtrl &mdash; GUI2Exe v0.2 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '',
          VERSION:     '0.2',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: ''
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/interface.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/GUI2Exe.ico"/>
    <link rel="contents" title="Global table of contents" href="contents.html" />
    <link rel="index" title="Global index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="GUI2Exe v0.2 documentation" href="index.html" />
    <link rel="up" title="Major Classes Reference" href="majorClasses.html" />
    <link rel="next" title="Py2AppPanel" href="Py2AppPanel.html" />
    <link rel="prev" title="Project" href="Project.html" />
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="Py2AppPanel.html" title="Py2AppPanel"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="Project.html" title="Project"
             accesskey="P">previous</a> |</li>
<li><img src="_static/gui2exe_small.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li>

        <li><a href="index.html">GUI2Exe v0.2 documentation</a> &raquo;</li>

          <li><a href="majorClasses.html" accesskey="U">Major Classes Reference</a> &raquo;</li>
      </ul>
    </div>
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section" id="module-ProjectTreeCtrl">
<h1 id="module-ProjectTreeCtrl">ProjectTreeCtrl<a class="headerlink" href="#module-ProjectTreeCtrl" title="Permalink to this headline">¶</a></h1>
<div class="section" id="api-reference">
<h2 id="api-reference">API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
<div class="section" id="classes">
<h3 id="classes">Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h3>
<div class="section" id="id1">
<span id="projecttreectrl-projecttreectrl-class"></span><h4 id="id1"><span id="projecttreectrl-projecttreectrl-class"></span>ProjectTreeCtrl<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
<dl class="class">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl">
<!--[ProjectTreeCtrl.ProjectTreeCtrl]-->class <tt class="descclassname">ProjectTreeCtrl.</tt><tt class="descname">ProjectTreeCtrl</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl" title="Permalink to this definition">¶</a></dt>
<dd><p>A custom tree control which displays all the GUI2Exe projects in a hierarchical
way, ordered by creation time.</p>
<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.__init__">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.__init__]--><tt class="descname">__init__</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Default class constructor.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>parent: the tree control parent widget.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.BindEvents">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.BindEvents]--><tt class="descname">BindEvents</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.BindEvents" title="Permalink to this definition">¶</a></dt>
<dd>Bind all the events we need to the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.BuildImageList">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.BuildImageList]--><tt class="descname">BuildImageList</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.BuildImageList" title="Permalink to this definition">¶</a></dt>
<dd>Builds the image list for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.CheckProjectName">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.CheckProjectName]--><tt class="descname">CheckProjectName</tt><big>(</big><em>projectName</em>, <em>usePyData=False</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.CheckProjectName" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if a project is valid and it doesn&#8217;t already exists in the tree control.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>projectName: the project name;</li>
<li>usePyData: whether to use the data store in the tree item.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.ConvertDate">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.ConvertDate]--><tt class="descname">ConvertDate</tt><big>(</big><em>date</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.ConvertDate" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a date in the appropriate format to be sorted by the tree.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>date: the date to be converted.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.CopyProject">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.CopyProject]--><tt class="descname">CopyProject</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.CopyProject" title="Permalink to this definition">¶</a></dt>
<dd>Copies an existing project to a new one, basically transferring the project
settings into a new project.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.DeleteAllProjects">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.DeleteAllProjects]--><tt class="descname">DeleteAllProjects</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.DeleteAllProjects" title="Permalink to this definition">¶</a></dt>
<dd>Deletes all the tree items, but not from the database.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.DeleteProject">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.DeleteProject]--><tt class="descname">DeleteProject</tt><big>(</big><em>treeItems</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.DeleteProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Auxiliary called by external modules.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>treeItems: the selected tree items to be deleted.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.GetUniqueProjectName">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.GetUniqueProjectName]--><tt class="descname">GetUniqueProjectName</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.GetUniqueProjectName" title="Permalink to this definition">¶</a></dt>
<dd>Generates an unique project name, not conflicting with the existing ones.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.HighlightItem">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.HighlightItem]--><tt class="descname">HighlightItem</tt><big>(</big><em>treeItem</em>, <em>highlight</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.HighlightItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Highlight/Un-highlight a tree item.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>treeItem: the tree item to highlight/un-highlight;</li>
<li>highlight: whether the tree item will be highlighted or not.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.IsProjectExisting">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.IsProjectExisting]--><tt class="descname">IsProjectExisting</tt><big>(</big><em>projectName</em>, <em>usePyData=False</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.IsProjectExisting" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if a project with the given name already exists.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>projectName: the project name;</li>
<li>usePyData: whether to use the data store in the tree item.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.LoadFromFile">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.LoadFromFile]--><tt class="descname">LoadFromFile</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.LoadFromFile" title="Permalink to this definition">¶</a></dt>
<dd>Load a project from a file.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.LoadFromPreferences">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.LoadFromPreferences]--><tt class="descname">LoadFromPreferences</tt><big>(</big><em>itemName</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.LoadFromPreferences" title="Permalink to this definition">¶</a></dt>
<dd>Re-load a project at startup if the user chose so.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.LoadProject">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.LoadProject]--><tt class="descname">LoadProject</tt><big>(</big><em>treeItems</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.LoadProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Actually loads the projects, calling the main frame method.</p>
<p>treeItems: the selected tree items, which will be loaded.</p>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.NewProject">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.NewProject]--><tt class="descname">NewProject</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.NewProject" title="Permalink to this definition">¶</a></dt>
<dd>Creates a new project, appending a new item to the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnBeginDrag">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnBeginDrag]--><tt class="descname">OnBeginDrag</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnBeginDrag" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_BEGIN_DRAG event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnBeginEdit">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnBeginEdit]--><tt class="descname">OnBeginEdit</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnBeginEdit" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_BEGIN_LABEL_EDIT event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnCompareItems">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnCompareItems]--><tt class="descname">OnCompareItems</tt><big>(</big><em>item1</em>, <em>item2</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnCompareItems" title="Permalink to this definition">¶</a></dt>
<dd>Re-implemented from CT.CustomTreeCtrl.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnDeleteItem">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnDeleteItem]--><tt class="descname">OnDeleteItem</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnDeleteItem" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_DELETE_ITEM event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnEndDrag">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnEndDrag]--><tt class="descname">OnEndDrag</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnEndDrag" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_END_DRAG event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnEndEdit">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnEndEdit]--><tt class="descname">OnEndEdit</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnEndEdit" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_END_LABEL_EDIT event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnKeyDown">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnKeyDown]--><tt class="descname">OnKeyDown</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnKeyDown" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_KEY_DOWN event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnLoadProject">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnLoadProject]--><tt class="descname">OnLoadProject</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnLoadProject" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_ITEM_ACTIVATED event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnPopupMenu">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnPopupMenu]--><tt class="descname">OnPopupMenu</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnPopupMenu" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_MENU_RANGE event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.OnRightClick">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.OnRightClick]--><tt class="descname">OnRightClick</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.OnRightClick" title="Permalink to this definition">¶</a></dt>
<dd>Handles the wx.EVT_TREE_ITEM_RIGHT_CLICK event for the tree control.</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.PopulateTree">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.PopulateTree]--><tt class="descname">PopulateTree</tt><big>(</big><em>dbKeys</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.PopulateTree" title="Permalink to this definition">¶</a></dt>
<dd><p>Populates the tree with the keys coming from the database.</p>
<p><strong>Parameters:</strong></p>
<ul>
<li><dl class="first docutils">
<dt>dbKeys: the database project names which will be used to name the</dt>
<dd><p class="first last">items in the tree.</p>
</dd>
</dl>
</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.RepositionItems">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.RepositionItems]--><tt class="descname">RepositionItems</tt><big>(</big><em>appendToRoot</em>, <em>droppedItem</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.RepositionItems" title="Permalink to this definition">¶</a></dt>
<dd><p>Repositions the items after a drag and drop operation.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>appendToRoot: whether to append the dropped item to the root item or not;</li>
<li>droppedItem: the item subjected to the drag and drop operation.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.SetItemEditing">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.SetItemEditing]--><tt class="descname">SetItemEditing</tt><big>(</big><em>treeItem</em>, <em>editState</em><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.SetItemEditing" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the state of a particular item as &#8220;in editing&#8221; or not.</p>
<p><strong>Parameters:</strong></p>
<ul class="simple">
<li>treeItem: the tree item;</li>
<li>editState: whether the item is being edited or not.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.SetProperties">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.SetProperties]--><tt class="descname">SetProperties</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.SetProperties" title="Permalink to this definition">¶</a></dt>
<dd>Sets few properties of the tree control (enable the Vista selection).</dd></dl>

<dl class="method">
<dt id="ProjectTreeCtrl.ProjectTreeCtrl.SortItems">
<!--[ProjectTreeCtrl.ProjectTreeCtrl.SortItems]--><tt class="descname">SortItems</tt><big>(</big><big>)</big><a class="headerlink" href="#ProjectTreeCtrl.ProjectTreeCtrl.SortItems" title="Permalink to this definition">¶</a></dt>
<dd>Sorts the tree items using the projects&#8217; creation dates.</dd></dl>

</dd></dl>

</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><img class="logo" src="_static/gui2exe_splash.png" alt="Logo"/></p>
            <h3>Table Of Contents</h3>
            <ul>
<li><a class="reference external" href="">ProjectTreeCtrl</a><ul>
<li><a class="reference external" href="#api-reference">API Reference</a><ul>
<li><a class="reference external" href="#classes">Classes</a><ul>
<li><a class="reference external" href="#id1">ProjectTreeCtrl</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="Project.html" title="previous chapter">Project</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="Py2AppPanel.html" title="next chapter">Py2AppPanel</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/ProjectTreeCtrl.txt">Show Source</a></li>
            </ul>
            <h3>Quick search</h3>
            <form class="search" action="search.html" method="get">
              <input type="text" name="q" size="18" /> <input type="submit" value="Go" />
              <input type="hidden" name="check_keywords" value="yes" />
              <input type="hidden" name="area" value="default" />
            </form>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="Py2AppPanel.html" title="Py2AppPanel"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="Project.html" title="Project"
             accesskey="P">previous</a> |</li>
<li><img src="_static/gui2exe_small.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li>

        <li><a href="index.html">GUI2Exe v0.2 documentation</a> &raquo;</li>

          <li><a href="majorClasses.html" accesskey="U">Major Classes Reference</a> &raquo;</li>
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2008, Andrea Gavana.
      Last updated on Oct 26, 2008.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
    </div>
  </body>
</html>